def sum_1(n):
    res = 0
    for i in range(len(n)):
        res += int(n[i])
    return res


if __name__ == '__main__':
    num = input()
    print(sum_1(num))
